.class Lrexsee/core/browser/Browser$5;
.super Lrexsee/core/browser/clazz/LoadResourceListeners$LoadResourceListener;
.source "Browser.java"


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Lrexsee/core/browser/Browser;-><init>(Landroid/content/Context;Lrexsee/core/browser/Browser;Lrexsee/core/widget/Div;Lrexsee/core/browser/clazz/BrowserParent;)V
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = null
.end annotation


# instance fields
.field final synthetic this$0:Lrexsee/core/browser/Browser;


# direct methods
.method constructor <init>(Lrexsee/core/browser/Browser;)V
    .locals 0

    .prologue
    .line 1
    iput-object p1, p0, Lrexsee/core/browser/Browser$5;->this$0:Lrexsee/core/browser/Browser;

    .line 185
    invoke-direct {p0}, Lrexsee/core/browser/clazz/LoadResourceListeners$LoadResourceListener;-><init>()V

    return-void
.end method


# virtual methods
.method public run(Landroid/content/Context;Lrexsee/core/browser/Browser;Ljava/lang/String;)V
    .locals 5
    .param p1, "context"    # Landroid/content/Context;
    .param p2, "browser"    # Lrexsee/core/browser/Browser;
    .param p3, "url"    # Ljava/lang/String;

    .prologue
    .line 188
    invoke-static {p3}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;

    move-result-object v1

    .line 189
    .local v1, "uri":Landroid/net/Uri;
    invoke-virtual {v1}, Landroid/net/Uri;->getScheme()Ljava/lang/String;

    move-result-object v0

    .line 190
    .local v0, "scheme":Ljava/lang/String;
    const-string v2, "http"

    invoke-virtual {v0, v2}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v2

    if-nez v2, :cond_0

    const-string v2, "https"

    invoke-virtual {v0, v2}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v2

    if-eqz v2, :cond_1

    :cond_0
    iget-object v2, p0, Lrexsee/core/browser/Browser$5;->this$0:Lrexsee/core/browser/Browser;

    iget-object v2, v2, Lrexsee/core/browser/Browser;->domainWhiteList:Lrexsee/core/browser/clazz/DomainWhiteList;

    invoke-virtual {v2, p3}, Lrexsee/core/browser/clazz/DomainWhiteList;->isValidUrl(Ljava/lang/String;)Z

    move-result v2

    if-nez v2, :cond_1

    .line 191
    invoke-virtual {p2}, Lrexsee/core/browser/Browser;->stopLoading()V

    .line 192
    iget-object v2, p2, Lrexsee/core/browser/Browser;->application:Lrexsee/core/application/RexseeApplication;

    new-instance v3, Ljava/lang/StringBuilder;

    const-string v4, "Not allowed to load resource: "

    invoke-direct {v3, v4}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v3, p3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v2, v3}, Lrexsee/core/application/RexseeApplication;->error(Ljava/lang/String;)V

    .line 194
    :cond_1
    return-void
.end method
